<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>薪资查询</title>
<script type="text/javascript" src="static/easyui/jquery.min.js"></script>
<script type="text/javascript" src="static/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="static/easyui/locale/easyui-lang-zh_CN.js"></script>
<link rel="stylesheet" href="static/easyui/themes/icon.css">
<link rel="stylesheet" href="static/easyui/themes/metro-blue/easyui.css">
</head>
<body>
<style type="text/css">
	*{
		margin:0px;
		padding:0px;
	}
	.background{
		width: 1120px;
	    height: 570px;
	    margin: 0px auto;
	    margin-top: 10px;
	    background-color: #FFF;
	}
	
	.es-head{
		width: 1125px;
		height:60px;
		margin:0px auto;
	}
	.head-left{
		width: 800px;
	    height: 27px;
	    float: left;
	    margin-top: 20px;
	    margin-left: 45px;
	}
	.head-left .textbox{
		width:150px;
	}
	#mingchen{
		font-size: 14px;
	}
	#salary-name{
		width: 150px;
	    height: 20px;
	    border-radius: 3px;
	    border: 1px solid #ccc;
	}
	.table{
		width: 1020px;
		margin:0px auto;
		margin-top:20px;
		border: 1px solid #E5E5E5;		
	}
	.datagrid-header .datagrid-cell span{
		color: #19AA9A;
	    font-size: 14px;
	    font-weight: 700;
	}
	.datagrid-header .datagrid-cell,.datagrid-cell, .datagrid-cell-group, .datagrid-header-rownumber, .datagrid-cell-rownumber {
		text-align: center;
	}
	.table .datagrid .panel-body{
	 	width: 1017px;
	}
	.datagrid-header{
		height:39px;
	}
	.datagrid-header-row, .datagrid-row {
   	 	height: 40px;
	}
	.bianji,.xiangqing{
		width: 45px;
    	height: 20px;
		font-size:12px;
		border-radius:4px;
	}
	.bianji,.xiangqing{
		width: 45px;
    	height: 20px;
		font-size:12px;
		border-radius:4px;
	}
	.bianji{
		color:#fff;
		background-color:#18A689;
		border:1px solid #18A689;
	}
	.xiangqing{
		color:#666666;
		border:1px solid #E4E4E4;
		background-color:#fff;
	}
	.tianjia-button{
		width: 50px;
	    height: 22px;
	    border: 1px solid #18A689;
	    background-color: #18A689;
	    color: #fff;
	    border-radius: 4px;
	    line-height: 22px;
	}
	.chaxun-button{
		width: 50px;
	    height: 22px;
	    border: 1px solid #18A689;
	    background-color: #18A689;
	    color: #fff;
	    border-radius: 4px;
	    margin-left: 21px;
	    line-height: 22px;
	}
	.box{
		width: 400px;
	    height: 280px;
	    background-color: #fff;
	    margin: 0px auto;
	    margin-top: 100px;
	}
	.text-tianjia{
		margin:0px auto;
		width: 100px;
    	font-size: 20px;
	}
	.form-text{
		font-size: 16px;
    	margin-top: 5px;
	}
	.form-text1{
		font-size: 16px;
	    margin-top: 5px;
	    position: relative;
	    left: 31px;
	}
	#items-name,#items-names{
		width: 170px;
	    height: 25px;
	    border-radius: 4px;
	    border: 1px solid #ccc;
	    margin-left: 5px;
	}
	#items-type,#items-types{
		width: 172px;
	    height: 26px;
	    border-radius: 4px;
	   	margin-left: 5px;
	}
	#items-remarks,#items-remarkss{
		width: 170px;
	    height: 25px;
	    border-radius: 4px;
	    border: 1px solid #ccc;
	    margin-left: 36px;
	}
	.div{
		width: 260px;
	    height: 30px;
	    margin-left: 45px;
	    margin-top: 20px;
	}
	.queding{
		border: 1px solid #fff;
	    color: #fff;
	    background-color: #18A689;
	    width: 65px;
	    height: 26px;
	    border-radius: 4px;
	    margin-top: 30px;
	}
	.quxiao{		
		width: 65px;
	    height: 25px;
	    border: 1px solid #18A689;
	    color: #18A689;
	    background-color: #fff;
	    border-radius: 4px;
	    margin-left: 5px;
	}
	#zhezhao,#zhezhao1{
		width:1366px;
		height:736px;
		position:fixed;
		top:0px;
		background: rgba(0, 0, 0, 0.5);
		text-align:center;
		left:0;
		z-index:10;
		display:none;
	}
	#kaishi{
		width: 100px;
    	height: 20px;
    	border: 1px solid #ddd;
	}
	#jieshu{
		width: 100px;
    	height: 20px;
    	border: 1px solid #ddd;
	}
	.months{
		margin-left: 32px;
    	font-size: 14px;
	}
	.centers{
		margin-left: 20px;
    	margin-right: 20px;
	}
	.pay-div{
		width:500px;
		height:30px;
		margin: 0px auto;
		margin-top: 20px;
	}
	.pay-text3{
		margin-left: 12px;
	}
	.pay-text4{
		margin-left: 87px;
	}
	.pay-input1{
		width: 150px;
	    height: 25px;
	    background-color: #fff;
	    border: 1px solid #ccc;
	    margin-right: 75px;
	}
	.pay-input2{
		width: 150px;
	    height: 25px;
	    background-color: #fff;
	    border: 1px solid #ccc;
	}
	.window-shadow{
		position: relative;
    	top: -273px;
		background: #F8F8F8;
	    opacity: 0.4;
	    border: 1px solid #F8F8F8;
		
	}
	.guanbi{
		border: 1px solid #ccc;
	    margin-top: 54px;
	    margin-left: 20px;
	    background-color: #fff;
	    width: 50px;
	    height: 25px;
	    margin-right: 10px;
	    line-height: 25px;
	    text-align: center;
	    cursor: pointer;
	    float: left;
	}
	.win-queding{	    
	    border: 1px solid #ccc;
	    margin-top: 54px;
	    margin-left: 235px;
	    background-color: #fff;
	    width: 50px;
	    height: 25px;
	    margin-right: 10px;
	    line-height: 25px;
	    text-align: center;
	    cursor: pointer;
	    float: left;
	}
	.window{
		margin-top:-54px;
	}
</style>
<script type="text/javascript">
		function add(text){
			$("#content-admin").panel({
				href:text
			});
		}		
		$(function(){
			$("#table_account").datagrid({
				url:'show-chaxun',
				singleSelect:true,			
				columns:[[{field:'staff_names',title:'用户',width:120},
					{field:'sp_thems',title:'发放主题',width:100},
					{field:'account_name',title:'所属套账',width:100},
					{field:'sa_base',title:'基本薪资(元)',width:100},
					{field:'si_money',title:'项目金额(元)',width:100},
               		{field:'sd_vacation',title:'请假(元)',width:100},
               		{field:'sd_overtime',title:'加班(元)',width:100},
          			{field:'sd_late',title:'迟到(元)',width:100},
          			{field:'sd_traffic',title:'缺勤(元)',width:100},
          			{field:'sd_absent',title:'旷工(元)',width:100},	          			
          			{field:'sd_le',title:'早退(元)',width:100},
          			{field:'sd_bonus',title:'全勤奖(元)',width:100},	          			
          			{field:'sd_yf',title:'应发工资(元)',width:100},
          			{field:'sd_count',title:'实发工资(元)',width:100}
          ]],
	          pagination:true,
			    pageNumber:1,
			    pageSize:5,
			    pageList:[5,10,15]
			});
			$("#ss-1").click(function(){
				var a=$("#salary-names").combogrid('grid');
				var b=a.datagrid('getSelected');
				if(b==""||b==null){
					alert("搜索前请选择员工");
					return false;
				}else{
					$("#table_account").datagrid({
						url:'find-pay-staffname?staff_id='+b.staff_id,
						singleSelect:true,			
						columns:[[{field:'staff_names',title:'用户',width:120},
							{field:'sp_thems',title:'发放主题',width:100},
							{field:'account_name',title:'所属套账',width:100},
							{field:'sa_base',title:'基本薪资(元)',width:100},
							{field:'si_money',title:'项目金额(元)',width:100},
		               		{field:'sd_vacation',title:'请假(元)',width:100},
		               		{field:'sd_overtime',title:'加班(元)',width:100},
		          			{field:'sd_late',title:'迟到(元)',width:100},
		          			{field:'sd_traffic',title:'缺勤(元)',width:100},
		          			{field:'sd_absent',title:'旷工(元)',width:100},	          			
		          			{field:'sd_le',title:'早退(元)',width:100},
		          			{field:'sd_bonus',title:'全勤奖(元)',width:100},	          			
		          			{field:'sd_yf',title:'应发工资(元)',width:100},
		          			{field:'sd_count',title:'实发工资(元)',width:100}
		          	]],
			          queryParams: {
			        	  Staff_id:b.Staff_id
			      		},
			          pagination:true,
					    pageNumber:1,
					    pageSize:5,
					    pageList:[5,10,15]
					});		
				}					
			});
			$("#ss-1").dblclick(function(){
				$("#table_account").datagrid({
					url:'show-chaxun',
					singleSelect:true,			
					columns:[[{field:'staff_names',title:'用户',width:120},
						{field:'sp_thems',title:'发放主题',width:100},
						{field:'account_name',title:'所属套账',width:100},
						{field:'sa_base',title:'基本薪资(元)',width:100},
						{field:'si_money',title:'项目金额(元)',width:100},
	               		{field:'sd_vacation',title:'请假(元)',width:100},
	               		{field:'sd_overtime',title:'加班(元)',width:100},
	          			{field:'sd_late',title:'迟到(元)',width:100},
	          			{field:'sd_traffic',title:'缺勤(元)',width:100},
	          			{field:'sd_absent',title:'旷工(元)',width:100},	          			
	          			{field:'sd_le',title:'早退(元)',width:100},
	          			{field:'sd_bonus',title:'全勤奖(元)',width:100},	          			
	          			{field:'sd_yf',title:'应发工资(元)',width:100},
	          			{field:'sd_count',title:'实发工资(元)',width:100}
	          ]],
		          pagination:true,
				    pageNumber:1,
				    pageSize:5,
				    pageList:[5,10,15]
				});				
			});
		});
		function xiangqing(staff_id){
			add("salary-ck-kaoqing?staff_id="+staff_id);
		}
</script>
	<div class="background">
			<div class="es-head">
				<div class="head-left">
					<span id="mingchen">名称：</span>
					<select id="salary-names"  editable="false" class="easyui-combogrid" style="width:150px;"
					    data-options="
					    panelWidth:400,
					    idField:'staff_id',
					    textField:'Staff_name',
					    url:'find-pay-staff',
					    columns:[[{field:'staff_id',title:'员工号',width:100},
						{field:'Staff_name',title:'员工姓名',width:100},
	               		{field:'Staff_sex',title:'性别',width:100},
	               		{field:'Staff_phone',title:'电话',width:120}
					    ]]">
					</select>
					<a id="ss-1"  class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true"></a>
				</div>
			</div>
			<div class="table">
				<table id="table_account" class="easyui-datagrid" style="width:1020px;height:400px"></table>
			</div>
	</div>
</body>
</html>